package com.yingjia.yingjiauniversity.base;

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;

/**
 * Application类
 */
public class MyApplication extends Application {
    static final String TAG = MyApplication.class.getSimpleName();
    private static MyApplication instance= null;
    public static Context context;

    ////懒汉式
    public MyApplication getInstance() {
        if (instance == null) {
            synchronized(MyApplication.class){
                instance = MyApplication.this ;
            }
        }
        return instance;
    }


    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(base);

    }

    @Override
    public void onCreate() {
        super.onCreate();
        context = this;
        initPlatformConfig();
    }
    private void initPlatformConfig() {
        /*//设置LOG开关，默认为false
        UMConfigure.setLogEnabled(true);
        //初始化组件化基础库, 统计SDK/推送SDK/分享SDK都必须调用此初始化接口

        UMConfigure.init(this, "59892f08310c9307b60023d0", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, "669c30a9584623e70e8cd01b0381dcb4");
        //开启ShareSDK debug模式，方便定位错误，具体错误检查方式可以查看http://dev.umeng.com/social/android/quick-integration的报错必看，正式发布，请关闭该模式
        //  Config.DEBUG = true;
        PlatformConfig.setWeixin(Constants.WX_APP_ID, Constants.WX_APP_SECRET);
        PlatformConfig.setQQZone(Constants.QQ_APP_ID, Constants.QQ_APP_SECRET);
        PlatformConfig.setSinaWeibo(Constants.WB_APP_ID, Constants.WB_APP_SECRET, Constants.WB_REDIRECT_URL);//// TODO: 2018/2/28  "http://sns.whalecloud.com"
*/

    }

}
